const USET_TOKEN_KEY = 'TDKP-USET-TOKEN';
const USET_COUPON_KEY = 'TDKP-USET-COUPON';
const USET_AD_KEY = 'TDKP-USET-AD';
const USET_LOCATION_KEY = 'TDKP-LOCATION';
/**
 * 获取用户token
 */

export function get() {
    return uni.getStorageSync(USET_TOKEN_KEY) || '';
}
export function getCoupon() {
    return uni.getStorageSync(USET_COUPON_KEY) || '';
}
export function getAd() {
    return uni.getStorageSync(USET_AD_KEY) || '';
}
export function getIsLocation() {
    return uni.getStorageSync(USET_LOCATION_KEY) || false;
}
/**
 * 设置用户TOKEN
 */

export function set(toekn) {
    return uni.setStorageSync(USET_TOKEN_KEY, toekn);
}
export function setCoupon(coupon) {
    return uni.setStorageSync(USET_COUPON_KEY, coupon);
}
export function setAd(ad) {
    return uni.setStorageSync(USET_AD_KEY, ad);
}
export function setIsLocation(location) {
    return uni.setStorageSync(USET_LOCATION_KEY, location);
}
/**
 * 删除用户token
 */

export function del() {
    uni.removeStorageSync(USET_TOKEN_KEY);
}
export function delCoupon() {
    uni.removeStorageSync(USET_COUPON_KEY);
}
export function delAd() {
    uni.removeStorageSync(USET_AD_KEY);
}
export function delIsLocation(location) {
    return uni.removeStorageSync(USET_LOCATION_KEY);
}
